1. Field of the Invention
The present invention relates to a control apparatus for controlling a depth information buffer (hereinafter, referred to as "Z-buffer") used in removing invisible planes in three-dimensional computer graphics.
2. Description of the Related Art
In three-dimensional graphic processing using a computer, when a plurality of objects are overlapped, invisible planes are removed in order to determine which edges and which planes of which object are visible and to display only visible planes. Conventionally, various algorithms are employed for removing invisible planes, as disclosed in Fundamentals of Interactive Computer Graphics, by J. D. Foley and A. Vandam, Addison Wesley Publishing Co., pp. 553-573, 1982. Among them, a Z-buffer algorithm is simple and widely used. In the Z-buffer algorithm, a Z-value (depth value) of each pixel on a screen is stored in a memory called a Z-buffer in advance. Then, a Z-value of each point (coordinates on the screen being represented by x and y) within a polygon is calculated, and the obtained calculation result is compared to the Z-value stored in the Z-buffer which corresponds to an (x, y) point. When the former is smaller than the latter, a data is written in a refresh buffer, and if not, no data is written therein.
FIG. 1 shows an example of a structure of a conventional processing system using a Z-buffer. FIG. 2 is a timing chart showing the operation timing of this system. In FIG. 1, I-buffer (brightness data buffer) 31 stores an I-value (brightness value) of each point on a screen. Normally, a dual port (2-port) memory is employed as I-buffer 31. Data in I-buffer are read out at high speed from its serial port. Readout data are sequentially converted into video signals and displayed on image display device 32 such as a CRT display. Control LSI 33 calculates address (x, y), I (x, y) and Z (x, y) of each point of an object. The address (x, y) is commonly supplied to I-buffer 31 and Z-buffer 34. I-value is fed to I-buffer 31. When a write-in operation is judged necessary by the comparison result Z (x, y) (described later), a new Z-value is fed to Z-buffer 34. In this manner, a write-in control for I-buffer 31 and Z-buffer 34 is performed. The processing performed by control LSI 33 comprises four basic cycles. In the first cycle, a calculation of address I, Z of a given point (xii, Yii) (i=0, 1 . . . ) on the screen is made. In the second cycle, the address is supplied to Z-buffer 34, and value Z' (xi, yi) corresponding to the above (xi, yi) is read out. In the third cycle, the read-out value Z' (xi, yi) is compared to the above calculated Z-value Z (xi, yi). If Z' (xi, yi)&gt;Z (xi, yi), it is judged that Z (xi, yi) is closer to the front (i.e., the depth thereof is closer). Thus, in the fourth cycle, the I-value and Z-value of the point (xi, yi) are written in I-buffer 31 and Z-buffer 34 in a corresponding manner.
However, in the above processing, one cycle is required for reading out the Z-value, resulting in a disadvantage in which the processing speed is decreased.